package com.company.woye.readycommit.adapter;

import android.content.Context;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.BaseAdapter;
import android.widget.LinearLayout;
import android.widget.TextView;

import com.company.woye.R;
import com.company.woye.onpackage.entity.BoxInfpEntity;

import java.util.List;

import butterknife.BindView;
import butterknife.ButterKnife;

public class ReadyCommitBottomAdapter extends BaseAdapter {

    private LayoutInflater inflater;
    private List<BoxInfpEntity> listSonEntities;

    public ReadyCommitBottomAdapter(Context context, List<BoxInfpEntity> listEntities) {
        this.inflater = LayoutInflater.from(context);
        this.listSonEntities = listEntities;
    }

    @Override
    public int getCount() {
        return 20;
    }

    @Override
    public Object getItem(int position) {
        return position;
    }

    @Override
    public long getItemId(int position) {
        return position;
    }

    @Override
    public View getView(int position, View convertView, ViewGroup parent) {
        ViewHolder viewHodler = null;
        if (convertView == null) {
            convertView = inflater.inflate(R.layout.intem_ready_commit_bottom_detail, parent, false);
            viewHodler = new ViewHolder(convertView);
            convertView.setTag(viewHodler);
        } else {
            viewHodler = (ViewHolder) convertView.getTag();
        }
        return convertView;
    }




    class ViewHolder {
        @BindView(R.id.tv_code)
        TextView tvCode;
        @BindView(R.id.tv_ZH)
        TextView tvZH;
        @BindView(R.id.tv_dept)
        TextView tvDept;
        @BindView(R.id.tv_factory)
        TextView tvFactory;
        @BindView(R.id.tv_water_line)
        TextView tvWaterLine;
        @BindView(R.id.tv_DBH)
        TextView tvDBH;
        @BindView(R.id.tv_order)
        TextView tvOrder;
        @BindView(R.id.tv_goodno)
        TextView tvGoodno;
        @BindView(R.id.tv_process)
        TextView tvProcess;
        @BindView(R.id.tv_SC)
        TextView tvSC;
        @BindView(R.id.tv_PO)
        TextView tvPO;
        @BindView(R.id.tv_county)
        TextView tvCounty;
        @BindView(R.id.tv_GH)
        TextView tvGH;
        @BindView(R.id.tv_num)
        TextView tvNum;
        @BindView(R.id.tv_real_num)
        TextView tvRealNum;

        ViewHolder(View view) {
            ButterKnife.bind(this, view);
        }
    }
}
